@extends('layouts.app')

@section('web_title','添加预约')

@section('css')
    <link href="{{ asset('css/addReservation.css') }}" rel="stylesheet">
    <link href="{{ asset('css/main.css') }}" rel="stylesheet">
@endsection

@section('content')
    <!--内容区域-->
    <div class="row">
        <div class="col-xs-12 content-box">
            <!--填充内容区域-->
            <div class="row">
                <div class="col-xs-12">
                    <div class="ibox float-e-margins bespeakPatient">
                        <div class="ibox-title base-message">
                            <h5>添加患者预约</h5>
                        </div>
                        <div class="ibox-content">
                            <form class="form-horizontal" id="addReservationForm">
                                <input type="hidden" name="patient_id" value="{{ $patient->id }}">
                                <div class="row base-message-input">
                                    <div class="col-xs-3 input_div">
                                        <span class="input-title">姓名</span>
                                        <input type="text" value="{{ $patient->name }}" class="form-control but_Fonts" name="name" disabled>
                                    </div>
                                    <div class="col-xs-3 input_div">
                                        <span class="input-title">性别</span>
                                        <select class="form-control m-b margin-bottom-0 but_Fonts" name="sex" disabled>
                                            <option>{{ $patient->sex['value'] }}</option>
                                        </select>
                                    </div>
                                    <div class="col-xs-3 input_div">
                                        <span class="input-title">出生日期</span>
                                        <input type="text" value="{{ $patient->birthday }}" class="form-control but_Fonts" name="birthday" disabled>
                                    </div>
                                    <div class="col-xs-3 input_div">
                                        <span class="input-title">手机号码</span>
                                        <input type="number" value="{{ $patient->phone }}" class="form-control but_Fonts" name="phone" disabled>
                                    </div>
                                    <div class="col-xs-3 margin-top-15 input_div">
                                        <span class="input-title">预约医院</span>
                                        <select class="form-control m-b margin-bottom-0 but_Fonts" name="hospital_id">
                                            @if($hospitals instanceof \Illuminate\Database\Eloquent\Collection)
                                                @foreach($hospitals as $hospital)
                                                    <option value="{{ $hospital->id }}">{{ $hospital->name }}</option>
                                                @endforeach
                                            @else
                                                <option value="{{ $hospitals->id }}">{{ $hospitals->name }}</option>
                                            @endif
                                        </select>
                                    </div>
                                    <div class="col-xs-3 margin-top-15 input_div">
                                        <span class="input-title">预约医生</span>
                                        <select class="form-control m-b margin-bottom-0 but_Fonts" name="doctor_id">
                                            @if($doctors instanceof \Illuminate\Database\Eloquent\Collection)
                                                @foreach($doctors as $doctor)
                                                    <option value="{{ $doctor->id }}">{{ $doctor->name }}</option>
                                                @endforeach
                                            @else
                                                <option value="{{ $doctors->id }}">{{ $doctors->name }}</option>
                                            @endif
                                        </select>
                                    </div>
                                    <div class="col-xs-3 margin-top-15 input_div">
                                        <span class="input-title"><i class="mandatory"></i>预约日期</span>
                                        <input type="text" class="form-control limitStartData but_Fonts" id="reservationDateInput" data-toggle="datepicker" placeholder="请输入预约日期" name="time">
                                    </div>
                                    <div class="col-xs-3 margin-top-15 input_div">
                                        <span class="input-title"><i class="mandatory"></i>诊室号</span>
                                        <select class="form-control m-b margin-bottom-0 but_Fonts" name="room">
                                            {{--@for($i=1; $i<=$current_hospital->clinic; $i++)--}}
                                                {{--<option value="{{ $i }}">诊室 {{ $i }}</option>--}}
                                            {{--@endfor--}}
                                            <option value="">请选择</option>
                                        </select>
                                    </div>
                                    <div class="col-xs-3 margin-top-15 input_div">
                                        <span class="input-title"><i class="mandatory"></i>时间段</span>
                                        <select class="form-control m-b margin-bottom-0 but_Fonts" name="am">
                                            <option value="">请选择</option>
                                        </select>
                                    </div>
                                    <div class="col-xs-3 margin-top-15 input_div">
                                        <span class="input-title"><i class="mandatory"></i>时间</span>
                                        <select class="form-control m-b margin-bottom-0 but_Fonts" name="section">
                                            <option value="">请选择</option>
                                        </select>
                                    </div>
                                    <div class="col-xs-3 margin-top-15 input_div">
                                        <span class="input-title">预约内容</span>
                                        <input type="text" placeholder="请输入预约内容" class="form-control but_Fonts" name="purpose" maxlength="255">
                                    </div>
                                    <div class="col-xs-3 margin-top-15 input_div">
                                        <span class="input-title">备注</span>
                                        <input type="text" placeholder="请输入备注" class="form-control but_Fonts" name="remark" maxlength="255">
                                    </div>

                                </div>
                            </form>
                            <div class="row">
                                <div class="col-xs-12 text-right margin-top-20">
                                    <button type="button" class="btn btn-primary btn-lg margin-right-15 but_Fonts" id="addReservationSave" data-url="{{ route('reservation.platform') }}">保存</button>
                                    <button type="button" class="btn btn-primary btn-lg btn-outline but_Fonts" id="addReservationClose" data-url="{{ route('manage.view.index') }}">取消</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
@section('js')
    <!--添加预约 单独文件  1-->
    <script src="{{ asset('js/addReservation.js') }}"></script>
@endsection
